import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/spcMain',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/spcMain/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/spcMain',
    method: 'put',
    data
  })
}

export function getEquipment(data) {
  return request({
    url: 'api/spcMain/getEquipment',
    method: 'get',
    data
  })
}

export function getTestItem(data) {
  return request({
    url: 'api/spcMain/getTestItem',
    method: 'post',
    data
  })
}

export function getDevicename(data) {
  return request({
    url: 'api/spcMain/getDevicename',
    method: 'post',
    data
  })
}

export function getDatalist(data) {
  return request({
    url: 'api/spcMain/getDatalist',
    method: 'post',
    data
  })
}

export function getRedact(data) {
  return request({
    url: 'api/spcMain/getRedact',
    method: 'post',
    data
  })
}

export function getSpc(data) {
  return request({
    url: 'api/spcMain/getSpc',
    method: 'post',
    data
  })
}


export default {add, edit, del, getEquipment, getTestItem, getDevicename, getDatalist, getRedact, getSpc}
